﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using olierFrm.WebFormDev.Cookie;
using System.Web.UI;
using olierFrm.WebFormDev.Session;

namespace olierFrm.WebFormDev
{
    public class ManageSystem
    {
        public static void IsLogin()
        {
            //CookieUser cu = new CookieUser();
            try
            {

                var x = SSession.User.Operator;
                if (x == null)
                {
                    HttpContext.Current.Response.RedirectPermanent("login.aspx");
                }
            }
            catch
            {
                HttpContext.Current.Response.RedirectPermanent("login.aspx");
            }
        }

        public static void SetTheme(Page page)
        {
            page.Theme = CTheme.Theme;
        }
    }
}
